<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<script language="javascript">
function purchasst()
{
	var seawarehouse = $("#endhouse").val();
	if(seawarehouse.indexOf('Amazon') >=0)
	{
		if($("#upfiles").val()=="")
		{
			$("#status").val(7);
			alert("亚马逊FBA必须上传标签!");
			$("#upfiles").focus();
			return;
		}else{
			$("#status").val(1);
		}
	
	}else{
		$("#status").val(1);
	}
	$("#theFrom").submit();	
}
</script>
<title>发货计划</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">确定发货计划</h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
          <li class="current"><a href="/oversea/purchasinglist">申请库存列表</a></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
          <form class="stdform stdform2"  id="theFrom" enctype="multipart/form-data" method="post" action="/oversea/savedelivery">
          <input type="hidden" id="status" name="status">
            <p>
            <label>始发地</label>
            <span class="field"> {{$starthouse}}
            <input type="hidden" name="starthouse" value="{{$starthouse}}">
            </span> </p>
          <p>
            <label>目的地</label>
            <span class="field"> {{$endhouse}}
            <input type="hidden" name="endhouse" id="endhouse" value="{{$endhouse}}">
            </span> </p>
           {{if $shopname}}
          <p>
            <label>店铺</label>
            <span class="field"> {{$shopname}}
            <input type="hidden" name="shopname" value="{{$shopname}}">
            </span> </p>
         
       
          {{/if}}
                        <p>
                        	<label>运输方式
</label>
                            <span class="field">
                          {{$transportmode}}

<input type="hidden" name="transportmode" value="{{$transportmode}}">

                            </span>
                        </p>
                       
                   {{if $carrier}}
          <p>
            <label>承运人</label>
            <span class="field"> {{$carrier}}
            <input type="hidden" name="carrier" value="{{$carrier}}">
            </span> </p>
         
       
          {{/if}}
          
            <p id="idbiaoqian" {{if $showfile==1}}{{else}}style="display:none"{{/if}}>
                        	<label><font color="#FF0000">上传FBA标签</font></label>
  					<span class="field"><input type="file" id="upfiles" name="upfiles"><span id=carriershowerr></span></span>
                           
                        </p>
          
           
          <br>
          <div class="contenttitle2">
            <h3>计划发货清单</h3>
          </div>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">SKU</th>
                <th class="head1">商品名称</th>
                <th class="head0">重量 KG</th>
                <th class="head1">体积 CBM</th>
                <th class="head0">长 CM</th>
                <th class="head0">宽 CM</th>
                <th class="head0">高 CM</th>
                <th class="head0">成本价</th>
                <th class="head0">发货数</th>
                <th class="head0">金额</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$goodslist item=li key=key}}
            <tr  {{if $li.st==1}}bgcolor="#FFD2D2" title="带商标商品"{{/if}}>
              <td>{{$li.sku}}<input type="hidden" name="goodslist[sku][]" value="{{$li.sku}}"></td>
              <td>{{$li.name}}</td>
              <td>{{$li.weight}}</td>
              <td class="center">{{$li.volumenum}}</td>
              <td class="center">{{$li.lengthnum}}</td>
              <td class="center">{{$li.widthnum}}</td>
              <td class="center">{{$li.heightnum}}</td>
              <td class="center">{{$li.costprice}}<input type="hidden" name="goodslist[costprice][]" value="{{$li.costprice}}"></td>
              <td class="center">{{$li.sendnums}}<input type="hidden" name="goodslist[sendnums][]" value="{{$li.sendnums}}"></td>
              <td class="center">{{$li.totalprice}}</td>
            </tr>
            {{/foreach}}
              </tbody>
            
            
          </table>
           <div class="contenttitle2">
            <h3>合计信息</h3>
          </div>
          <div class="bq2 currentstatus marginbottom0">
                     合计SKU数：{{$totalsku}}个；合计数量：{{$totalnum}}；合计金额:{{$totalprice}}
         </div>
                    
          {{if $configoverseadetail==1}}
          <div class="contenttitle2">
            <h3>需求明细</h3>
          </div>
          <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <colgroup>
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            </colgroup>
            <thead>
              <tr>
                <th class="head0">SKU</th>
                <th class="head1">姓名</th>
                <th class="head0">需要数</th>
                <th class="head1">计划发货数</th>
                <th class="head1">仓库</th>
                <th class="head1">商铺</th>
              </tr>
            </thead>
            <tbody>
            
            {{foreach from=$detail item=li key=key}}
            <tr>
              <td>{{$li.sku}}</td>
              <td>{{$li.createUser}}</td>
              <td>{{$li.skunum}}</td>
              <td class="center">{{$li.sendnums}}</td>
              <td class="center">{{$li.seawarehouse}}</td>
              <td class="center">{{$li.shopname}}</td>
            </tr>
            {{/foreach}}
              </tbody>
            
            <tfoot>
            </tfoot>
          </table>
          {{/if}}
          <input type="hidden" name="totalsku" value="{{$totalsku}}">
          <input type="hidden" name="totalnum" value="{{$totalnum}}">
          <input type="hidden" name="totalprice" value="{{$totalprice}}">
          <input type="hidden" name="detail" value='{{$hiddendetail}}'>
          <p class="stdformbutton"> <span >
            <input type="hidden" name="endhouse" value="{{$endhouse}}">
            <button type="button" class="submit radius2" id="btn" onClick="purchasst()">保存计划</button>
            </span> </p>
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
    
  </div>
  <!-- centercontent --> 
  
</div>
<!--bodywrapper-->

</body>
</html>